package com.feilong.cn.mybatis.Auto;

/**
 * Created by yangxulong on 2018/4/4.
 */
public class TestEntity {
    private String name;
    private Integer age;
    private final String type = "person";

    TestEntity(String name, Integer age) {
        this.name = name;
        this.age = age;
    }

    public static TestEntity.TestEntityBuilder builder() {
        return new TestEntity.TestEntityBuilder();
    }

    public static class TestEntityBuilder {
        private String name;
        private Integer age;

        TestEntityBuilder() {
        }

        public TestEntity.TestEntityBuilder name(String name) {
            this.name = name;
            return this;
        }

        public TestEntity.TestEntityBuilder age(Integer age) {
            this.age = age;
            return this;
        }

        public TestEntity build() {
            return new TestEntity(this.name, this.age);
        }

        public String toString() {
            return "TestEntity.TestEntityBuilder(name=" + this.name + ", age=" + this.age + ")";
        }
    }
}
